
#include <stdio.h>


int main(void){
	int a = 0x12345678;
	char* p1 = (char *)&a;
	// p1为a的首地址
	
	printf("%#x\n", *p1);
	
	p1++;
	printf("%#x\n", *p1);
	
	short* p2 = (short *)&a;
	printf("%#x\n", *p2);

	// 获取中间两个字节
	short* p3 = (short *)((char *)&a + 1);
	printf("%#x\n", *p3);

	return 0;
}
